package com.project2.mapper;

import com.project2.bean.po.MarketGoods;
import com.project2.bean.po.MarketGoodsProduct;
import com.project2.bean.po.MarketGoodsProductExample;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface MarketGoodsProductMapper {
    long countByExample(MarketGoodsProductExample example);

    int deleteByExample(MarketGoodsProductExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(MarketGoodsProduct record);

    int insertSelective(MarketGoodsProduct record);

    List<MarketGoodsProduct> selectByExample(MarketGoodsProductExample example);

    MarketGoodsProduct selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") MarketGoodsProduct record, @Param("example") MarketGoodsProductExample example);

    int updateByExample(@Param("record") MarketGoodsProduct record, @Param("example") MarketGoodsProductExample example);

    int updateByPrimaryKeySelective(MarketGoodsProduct record);

    int updateByPrimaryKey(MarketGoodsProduct record);

    List<MarketGoodsProduct> selectProductsByGoodsId(Integer id);


    int updateByGoodsId(@Param("goodsId") Integer goodsId, @Param("date") Date date);

    int updateProductNumByP(@Param("p") MarketGoodsProduct product);

    int updateDeleteProductNumByP(@Param("p") MarketGoodsProduct product);
}